a601eb64fb0f7ff498df148e7b4cce2acf1aa1a1,advanced/src/java/org/neo4j/impl/nioneo/xa/Command.java,Command,writeDynamicRecord,#DynamicRecord#ByteBuffer#,55
Before Change
{
// id+in_use(byte)+prev_block(int)+nr_of_bytes(int)+next_block(int)
// buffer.clear();
if ( record.inUse() )
{
// byte inUse = record.inUse() ?
// Record.IN_USE.byteValue() : Record.NOT_IN_USE.byteValue();
byte inUse = Record.IN_USE.byteValue();
buffer.putInt( record.getId() ).put( inUse ).putInt(
record.getPrevBlock() ).putInt( record.getLength()
).putInt( record.getNextBlock() ).put( record.getData() );
}
else
{
byte inUse = Record.NOT_IN_USE.byteValue();
buffer.putInt( record.getId() ).put( inUse );
}
// buffer.flip();
// fileChannel.write( buffer );
After Change
}
static void writeDynamicRecord( DynamicRecord record,
FileChannel fileChannel, ByteBuffer buffer ) throws IOException
{
// id+in_use(byte)+prev_block(int)+nr_of_bytes(int)+next_block(int)
buffer.clear();
byte inUse = record.inUse() ?
Record.IN_USE.byteValue() : Record.NOT_IN_USE.byteValue();
buffer.putInt( record.getId() ).put( inUse ).putInt(
record.getPrevBlock() ).putInt( record.getLength()
).putInt( record.getNextBlock() ).put( record.getData() );
buffer.flip();
fileChannel.write( buffer );
}
static DynamicRecord readDynamicRecord( FileChannel fileChannel,